import RPi.GPIO as GP
import time
GP.setmode(GP.BOARD)
GP.setup((11,13),GP.OUT)
pwmr=GP.PWM(13,50)
pwmg=GP.PWM(11,50)
for j in range(6):
    if j%2==0:
        for i in range(1,20):
            pwmr.start(1)
            pwmr.ChangeDutyCycle(i*1.5)
            time.sleep(0.1)
        for i in range(20,1,-1):
            pwmr.ChangeDutyCycle(i*1.5)
            time.sleep(0.1)
        pwmr.stop()
    elif j%2==1:
        for i in range(1,20):
            pwmg.start(1)
            pwmg.ChangeDutyCycle(i*1.5)
            time.sleep(0.1)
        for i in range(20,1,-1):
            pwmg.ChangeDutyCycle(i*1.5)
            time.sleep(0.1)
        pwmg.stop()

GP.cleanup()